package com.jpm.jroguefx.levels;

import com.jpm.jroguefx.utilities.Utilities;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.Assert.assertNotNull;

public class OutsideTest {

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
    }

    @Before
    public void setUp() throws Exception {
    }

    @Test
    public void testMapBuild() {

        for (int i = 0; i < 50; i++) {
            Outside obj = new Outside();
            assertNotNull(obj);
        }
    }

    @Test
    public void testMapForNulls() {
        for (int i = 0; i < 50; i++) {
            Outside obj = new Outside();
            for (int x = 0; x < obj.getXlimit(); x++) {
                for (int y = 0; y < obj.getYlimit(); y++) {
                    assertNotNull(obj.tileMap[x][y].getTerrain(0));
                }
            }
        }
    }

    @Test
    public void testRandoms() {

        for (int i = 0; i < 10; i++) {
            System.out.println(Utilities.random(1, 3));
        }
    }

}


